﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace STS.Model
{
    [Table]
    public class BadaniaMocz : INotifyPropertyChanged, INotifyPropertyChanging
    {
        private int id;

        [Column(IsPrimaryKey = true, IsDbGenerated = true, DbType = "INT NOT NULL Identity", CanBeNull = false, AutoSync = AutoSync.OnInsert)]
        public int Id
        {
            get { return id; }
            set
            {
                if (id != value)
                {
                    NotifyPropertyChanging("Id");
                    id = value;
                    NotifyPropertyChanged("Id");
                }
            }
        }

        private int idMocz;

        [Column]
        public int IdMocz
        {
            get { return idMocz; }
            set
            {
                if (idMocz != value)
                {
                    NotifyPropertyChanging("IdMocz");
                    idMocz = value;
                    NotifyPropertyChanged("IdMocz");
                }
            }
        }

        private DateTime dataBadania;

        [Column]
        public DateTime DataBadania
        {
            get { return dataBadania; }
            set
            {
                if (dataBadania != value)
                {
                    NotifyPropertyChanging("DataBadania");
                    dataBadania = value;
                    NotifyPropertyChanged("DataBadania");
                }
            }
        }

        private string barwa;

        [Column]
        public string Barwa
        {
            get { return barwa; }
            set
            {
                if (barwa != value)
                {
                    NotifyPropertyChanging("Barwa");
                    barwa = value;
                    NotifyPropertyChanged("Barwa");
                }
            }
        }

        private string przejrzystosc;

        [Column]
        public string Przejrzystosc
        {
            get { return przejrzystosc; }
            set
            {
                if (przejrzystosc != value)
                {
                    NotifyPropertyChanging("Przejrzystosc");
                    przejrzystosc = value;
                    NotifyPropertyChanged("Przejrzystosc");
                }
            }
        }

        private double ciezarWl;

        [Column]
        public double CiezarWl
        {
            get { return ciezarWl; }
            set
            {
                if (ciezarWl != value)
                {
                    NotifyPropertyChanging("CiezarWl");
                    ciezarWl = value;
                    NotifyPropertyChanged("CiezarWl");
                }
            }
        }

        private double ph;

        [Column]
        public double Ph
        {
            get { return ph; }
            set
            {
                if (ph != value)
                {
                    NotifyPropertyChanging("Ph");
                    ph = value;
                    NotifyPropertyChanged("Ph");
                }
            }
        }

        private string azotyny;

        [Column]
        public string Azotyny
        {
            get { return azotyny; }
            set
            {
                if (azotyny != value)
                {
                    NotifyPropertyChanging("Azotyny");
                    azotyny = value;
                    NotifyPropertyChanged("Azotyny");
                }
            }
        }

        private string bialko;

        [Column]
        public string Bialko
        {
            get { return bialko; }
            set
            {
                if (bialko != value)
                {
                    NotifyPropertyChanging("Bialko");
                    bialko = value;
                    NotifyPropertyChanged("Bialko");
                }
            }
        }

        private string glukoza;

        [Column]
        public string Glukoza
        {
            get { return glukoza; }
            set
            {
                if (glukoza != value)
                {
                    NotifyPropertyChanging("Glukoza");
                    glukoza = value;
                    NotifyPropertyChanged("Glukoza");
                }
            }
        }

        private string cialaKetonowe;

        [Column]
        public string CialaKetonowe
        {
            get { return cialaKetonowe; }
            set
            {
                if (cialaKetonowe != value)
                {
                    NotifyPropertyChanging("CialaKetonowe");
                    cialaKetonowe = value;
                    NotifyPropertyChanged("CialaKetonowe");
                }
            }
        }

        private string urobilinogen;

        [Column]
        public string Urobilinogen
        {
            get { return urobilinogen; }
            set
            {
                if (urobilinogen != value)
                {
                    NotifyPropertyChanging("Urobilinogen");
                    urobilinogen = value;
                    NotifyPropertyChanged("Urobilinogen");
                }
            }
        }

        private string bilirubina;

        [Column]
        public string Bilirubina
        {
            get { return bilirubina; }
            set
            {
                if (bilirubina != value)
                {
                    NotifyPropertyChanging("Bilirubina");
                    bilirubina = value;
                    NotifyPropertyChanged("Bilirubina");
                }
            }
        }

        private string nablonkiPlaskie;

        [Column]
        public string NablonkiPlaskie
        {
            get { return nablonkiPlaskie; }
            set
            {
                if (nablonkiPlaskie != value)
                {
                    NotifyPropertyChanging("NablonkiPlaskie");
                    nablonkiPlaskie = value;
                    NotifyPropertyChanged("NablonkiPlaskie");
                }
            }
        }

        private double leukocyty;

        [Column]
        public double Leukocyty
        {
            get { return leukocyty; }
            set
            {
                if (leukocyty != value)
                {
                    NotifyPropertyChanging("Leukocyty");
                    leukocyty = value;
                    NotifyPropertyChanged("Leukocyty");
                }
            }
        }

        private string pasmaSlizu;

        [Column]
        public string PasmaSlizu
        {
            get { return pasmaSlizu; }
            set
            {
                if (pasmaSlizu != value)
                {
                    NotifyPropertyChanging("PasmaSlizu");
                    pasmaSlizu = value;
                    NotifyPropertyChanged("PasmaSlizu");
                }
            }
        }

        private int idLekarza;

        [Column]
        public int IdLekarza
        {
            get { return idLekarza; }
            set
            {
                if (idLekarza != value)
                {
                    NotifyPropertyChanging("IdLekarza");
                    idLekarza = value;
                    NotifyPropertyChanged("IdLekarza");
                }
            }
        }

        private int idPacjenta;

        [Column]
        public int IdPacjenta
        {
            get { return idPacjenta; }
            set
            {
                if (idPacjenta != value)
                {
                    NotifyPropertyChanging("IdPacjenta");
                    idPacjenta = value;
                    NotifyPropertyChanged("IdPacjenta");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public event PropertyChangingEventHandler PropertyChanging;

        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }
        }

        public override string ToString()
        {
            return String.Format("Id: {0} Nazwa: {1} IdTypLekarza: {2}", Id, Barwa, IdMocz);
        }
    }
}
